package com.gorkr.bio.file;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * 接收客户端发送的任意文件
 * @author gorkr
 * @date 2022/05/31 22:27
 **/
public class Server {

    public static void main(String[] args) {
        try {
            ServerSocket serverSocket = new ServerSocket(8888);
            while(true){
                Socket socket = serverSocket.accept();
                new ServerReaderThread(socket).start();
            }

        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

}
    